<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>内边距</title>
</head>
<body>

<style>
    #div1{
        width: 400px;
        height: 400px;
        border: 10px solid red;
        /*   嵌套，
        内边框到外边框的距离*/
        padding-top:50px;
        padding-left: 50px;
    }
    #div2{
        width: 200px;
        height: 200px;
        border: 25px solid blue;
        /*平级 外边距*/
        /*margin-top: 50px;*/
        /*margin-left: 50px;*/
    }
</style>
<div id="div1">
    <div id="div2">

    </div>
</div>
</body>
</html>